function [Pa] = ChoiceProb(F,u,V,opt)
% Each element (n,a) is the probability of choosing action a in state n. 
    
% % Number of choices:
Na = size(u,2);
% Number of states:
Ns = size(V,1);
 
% Get denominator:
D = zeros(Ns,1);

for i=1:Na
    D = D + exp(u(:,i) + opt.rho*F{i}*V);
end

Pa = zeros(Ns,Na);
for i=1:Na
    Pa(:,i) = exp(u(:,i) + opt.rho*F{i}*V)./D;
end

end